package com.string;

public class StringToInteger {
	public static int getInteger(String str){
		int result=0;
		for(int i=0;i<str.length();i++){
			result=result*10+str.charAt(i)-'0';
		}
		return result;
	}
public static void main(String[] args) {
	
	System.out.println(getInteger("Z"));
}
}
